import random
print("模拟骰子")
cishu = int(1)
shenlu = int(0)
while True:
    use = input("请猜测1（大）0为（小）：")
    number1 = random.randint(1, 6)
    number2 = random.randint(1, 6)
    number3 = random.randint(1, 6)
    sum = number3 + number2 + number1
    cishu = cishu+1
    if sum<10:
        sai = '小'
        print("输出结果为小\n")
    else:
        sai = '大'
        print("输出结果为大\n")
    if use == sai:
        print("你猜的对了")
        shenlu = shenlu+1
    else:
        print("你猜错了")
    if (use == 'exit'):
        break

shenlu1 = cishu%shenlu
print("你一共完了%d次数：" % cishu)
print("你的胜率是%d" % shenlu1)